<!DOCTYPE HTML>
<html>
<head>
<script src="../resources/js-test.js"></script>
</head>
<body>

<input id="range1" type="range" min="0" max="100" value="50">
<input id="range2" type="range" min="0" max="10" value="5">
<input id="range3" type="range" min="0" max="50" value="10" step="5">

<script>

description("Check whether changing slider's value without step attribute works properly");

if (window.accessibilityController) {
    // Checking whether step is greater than one
    var range1 = accessibilityController.accessibleElementById("range1");
    shouldBe("range1.intValue", "50");
    range1.increment();
    shouldBe("range1.intValue", "51");
    range1.increment();
    shouldBe("range1.intValue", "52");
    range1.decrement();
    shouldBe("range1.intValue", "51");
    range1.increment();
    shouldBe("range1.intValue", "52");

    var range2 = accessibilityController.accessibleElementById("range2");
    shouldBe("range2.intValue", "5");
    range2.increment();
    shouldBe("range2.intValue", "6");
    range2.increment();
    shouldBe("range2.intValue", "7");
    range2.decrement();
    shouldBe("range2.intValue", "6");
    range2.increment();
    shouldBe("range2.intValue", "7");

    var range3 = accessibilityController.accessibleElementById("range3");
    shouldBe("range3.intValue", "10");
    range3.increment();
    shouldBe("range3.intValue", "15");
    range3.increment();
    shouldBe("range3.intValue", "20");
    range3.decrement();
    shouldBe("range3.intValue", "15");
    range3.increment();
    shouldBe("range3.intValue", "20");
}
</script>
</body>
</html>
